﻿using System.Web.Mvc;

namespace lab04_viewdataextensions.Models
{
    public static class ViewDataMasterExtensions
    {
        public static string GetHeader(this ViewDataDictionary viewData)
        {
            return viewData["Master.Header"] as string;
        }

        public static void SetHeader(this ViewDataDictionary viewData, string header)
        {
            viewData["Master.Header"] = header;
        }

        public static string GetSubheader(this ViewDataDictionary viewData)
        {
            return viewData["Master.Subheader"] as string;
        }

        public static void SetSubheader(this ViewDataDictionary viewData, string subheader)
        {
            viewData["Master.Subheader"] = subheader;
        }
    }
}
